<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:page="urn:page">
  <xsl:output method="html" encoding="utf-8"/>
  <xsl:param name="param"/>
  <xsl:param name="templatename"/>
  <xsl:template match="/">
    <xsl:choose>
      <xsl:when test="$templatename='户型图'">
        <ul>
          <li><a href="#{$param}">
            <xsl:attribute name="onclick">TM.open('[xml]编辑户型图',{title:'增加楼盘图片',args:'buildingid=<xsl:value-of select="$param"/>&amp;id=0',width:400,height:200})</xsl:attribute>
            增加图片</a></li>
          <xsl:for-each select="rows/row">
            <li style="float:left">
              <div style="overflow:hidden; width:100px;"><a href="{F_Images}"><img border="0" src="/Thumbnail/{F_Images}" alt="{F_Title}" /></a></div>
              <div><a href="#{$param}"><xsl:attribute name="onclick">if(TM.doConfirmCmd('删除户型图','删除户型图','id=<xsl:value-of select="ID"/>'))TM.reload();</xsl:attribute>删除</a></div></li>
          </xsl:for-each>
        </ul>
      </xsl:when>
      <xsl:when test="$templatename='编辑户型图'">
        <div style="padding:4px;">
          <form id="planform">
            <input name="editplanid" type="hidden" value="{rows/row/ID}" />
            <ul class="list">
              <li>
                <div class="fl">楼盘编号</div>
                <div>
                  <xsl:value-of select="page:xRequest('buildingid')"/>
                </div>
              </li>
              <li>
                <div class="fl">标题</div>
                <div>
                  <input name="plantitle" type="text" class="w150" value="{rows/row/F_Name}" id="bdName" />
                </div>
              </li>
              <li>
                <div class="fl">图片路径</div>
                <div>
                  <input name="planImages" rows="3" class="w250" value="{rows/row/F_Images}" id="planImages" onclick="TM.FileSelect('planImages',this,'File Select')" readonly="readonly"/>
                </div>
              </li>
            </ul>
            <div class="cmdButton">
              <input name="f" type="hidden" value="@户型图" />
              <input name="buildingid" type="hidden" value="{page:xRequest('buildingid')}" />
              <input type="button" name="Submit" value="保存并返回" onclick="if(TM.saveContentCmd(this,'planform',0)==1)TM.reload()"  class="btnD"/>
            </div>
          </form>
        </div>
      </xsl:when>
    </xsl:choose>
  </xsl:template>
</xsl:stylesheet>